﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Heavy_Metals
{
    public partial class StartGovernment : Form
    {
        public FormLogin fl = new FormLogin();
        public StartGovernment(FormLogin formLogin)
        {
            InitializeComponent();
            this.fl = formLogin;
            GlobalVariable.quanxian = "government";
        }
        // 请将 panel2 中要用到的窗口在此声明（不new，不赋值），在afterselect事件中，
        // 需要用到对应的窗口请先判断是否为空，空再新建，负责应直接显示不要重复申请资源。
        // start
        DataCollect_Com datacollect_com = null;
        EventAlarm_com eventalarm_com = null;


        private void StartGovernment_Load(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;
            System.Windows.Forms.TreeNode node1;//定义节点
            TreeNode node2;
            TreeNode node3;
            TreeNode node4;
            TreeNode node5;
            node1 = treeView1.Nodes.Add("登录账户信息");
            node1.Text = "登录账户信息";
            node2 = treeView1.Nodes.Add("更改密码");
            node2.Text = "更改密码";
            node3 = treeView1.Nodes.Add("帮助");
            node3.Text = "帮助";
            node4 = treeView1.Nodes.Add("注销");
            node4.Text = "注销";
            node5 = treeView1.Nodes.Add("退出");
            node5.Text = "退出";
            treeView1.Parent = splitContainer1.Panel1;
        }

        private void 开始ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            splitContainer1.Panel1.Controls.Clear();//这里是清空panel1中的控件的。
            this.treeView1.Nodes.Clear();
            System.Windows.Forms.TreeNode node1;//定义节点
            TreeNode node2;
            TreeNode node3;
            TreeNode node4;
            TreeNode node5;
            node1 = treeView1.Nodes.Add("登录账户信息");
            node1.Text = "登录账户信息";
            node2 = treeView1.Nodes.Add("更改密码");
            node2.Text = "更改密码";
            node3 = treeView1.Nodes.Add("帮助");
            node3.Text = "帮助";
            node4 = treeView1.Nodes.Add("注销");
            node4.Text = "注销";
            node5 = treeView1.Nodes.Add("退出");
            node5.Text = "退出";
            treeView1.Parent = splitContainer1.Panel1;
        }
        private void 污染预测ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.treeView1.Nodes.Clear();
            splitContainer1.Panel1.Controls.Clear();//这里是清空panel1中的控件的。
            System.Windows.Forms.TreeNode MXLD, CGYC, YJYC;//定义节点
            TreeNode KSLD, CKYLDMX;//模型率定的子节点
            TreeNode XSKYMX1, LSYC;//常规预测子节点
            TreeNode XSKYMX2, LSYJYC;//应急预测子节点
            MXLD = treeView1.Nodes.Add("模型率定");
            CGYC = treeView1.Nodes.Add("常规预测");
            YJYC = treeView1.Nodes.Add("应急预测");
            KSLD = MXLD.Nodes.Add("开始率定");
            CKYLDMX = MXLD.Nodes.Add("查看已率定模型");
            XSKYMX1 = CGYC.Nodes.Add("显示可用模型");
            LSYC = CGYC.Nodes.Add("历史预测");
            XSKYMX2 = YJYC.Nodes.Add("显示历史模型");
            LSYJYC = YJYC.Nodes.Add("历史应急预测");
            treeView1.Parent = splitContainer1.Panel1;


        }

        private void 预警判定ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.treeView1.Nodes.Clear();
            splitContainer1.Panel1.Controls.Clear();//这里是清空panel1中的控件的。
            TreeNode YJPDXX, YJQYPD, YJTYDHZZ, GCFY;
            TreeNode MGST, WXHXP, ZJS;
            TreeNode DQYCJG, FXJS, YJFJ;
            YJPDXX = treeView1.Nodes.Add("预警判定信息");
            MGST = YJPDXX.Nodes.Add("敏感受体信息");
            WXHXP = YJPDXX.Nodes.Add("危险化学品信息");
            ZJS = YJPDXX.Nodes.Add("重金属信息");

            YJQYPD = treeView1.Nodes.Add("预警区域判定");
            DQYCJG = YJQYPD.Nodes.Add("读取预测结果");
            FXJS = YJQYPD.Nodes.Add("风险计算");
            YJFJ = YJQYPD.Nodes.Add("预警分级");

            YJTYDHZZ = treeView1.Nodes.Add("预警图与动画制作");

            GCFY = treeView1.Nodes.Add("过程反演");
            treeView1.Parent = splitContainer1.Panel1;

        }
        private void 风险源信息管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.treeView1.Nodes.Clear();
            TreeNode FXYXX, LYXX, QYXX;
            TreeNode DanFXY, DuoFXY;
            FXYXX = treeView1.Nodes.Add("风险源信息");
            DanFXY = FXYXX.Nodes.Add("单风险源查看与分析");
            DuoFXY = FXYXX.Nodes.Add("多风险源查看与分析");

            TreeNode JCDL, SWDZ, JCDM, YACSYHL;
            LYXX = treeView1.Nodes.Add("流域信息");
            JCDL = LYXX.Nodes.Add("基础地理信息");
            SWDZ = LYXX.Nodes.Add("水文地质信息");
            JCDM = LYXX.Nodes.Add("监测断面信息");
            YACSYHL = LYXX.Nodes.Add("沿岸城市与河流功能区信息");

            QYXX = treeView1.Nodes.Add("相关企业信息");

            treeView1.Parent = splitContainer1.Panel1;
        }
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            string name = "";
            //MessageBox.Show(treeView1.SelectedNode.Text, "操作提示");
            name = treeView1.SelectedNode.Text.ToString();
            //开始菜单下菜单项响应
            if (name != null)
            {
                if (name.Equals("登录账户信息"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    InfoGovernment gInfo = new InfoGovernment();
                    gInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    gInfo.Parent = splitContainer1.Panel2;
                    gInfo.Show();
                }
                else if (name.Equals("更改密码"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的
                    ModifyInfo mInfo = new ModifyInfo();
                    mInfo.MdiParent = this;
                    mInfo.Parent = splitContainer1.Panel2;
                    mInfo.Show();
                }
                else if (name.Equals("帮助"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的
                    Help help = new Help();
                    help.MdiParent = this;
                    help.Parent = splitContainer1.Panel2;
                    help.Show();
                }
                else if (name.Equals("注销"))
                {

                    this.Hide();
                    closeflag = true;
                    this.fl.Show();

                }
                else if (name.Equals("退出"))
                {
                    Application.Exit();
                }

                if (name.Equals("应急预案与对策"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    EmgPlanAndCountermeasuresForm cInfo = new EmgPlanAndCountermeasuresForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                if (name.Equals("权值查询"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    WeightQueryGovForm cInfo = new WeightQueryGovForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                if (name.Equals("案例管理"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    CaseManageForm cInfo = new CaseManageForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                if (name.Equals("案例推理"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    CaseReasonInputForm cInfo = new CaseReasonInputForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                if (name.Equals("预案评价"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    CaseValuationForm cInfo = new CaseValuationForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }

                if (name.Equals("应急资源信息查看"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    EmgResInfoForm cInfo = new EmgResInfoForm();
                    //cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    //cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                if (name.Equals("重金属信息查看"))
                {
                    /*splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    CaseValuationForm cInfo = new CaseValuationForm();
                    //cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    //cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();*/
                    YJPDXX_ZJS zjs = new YJPDXX_ZJS();
                    zjs.Show();
                }
                if (name.Equals("应急专家信息查看"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    ExpertInfoForm cInfo = new ExpertInfoForm();
                    //cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    //cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                if (name.Equals("危险化学品信息查看"))
                {
                    /*splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    CaseValuationForm cInfo = new CaseValuationForm();
                    //cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    //cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();*/
                    YJPDXX_WXHXP hxp = new YJPDXX_WXHXP();
                    hxp.Show();
                }
                if (name.Equals("法律法规信息查看"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    LawInfoForm cInfo = new LawInfoForm();
                    //cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    //cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                if (name.Equals("敏感受体信息查看"))
                {
                   // splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    //CaseValuationForm cInfo = new CaseValuationForm();
                    //cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    //cInfo.Parent = splitContainer1.Panel2;
                   // cInfo.Show();
                    YJPDXX_MGST mgst = new YJPDXX_MGST();
                    mgst.Show();
                }
                if (name.Equals("各行政区基本社会经济信息"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    CityInfoForm cInfo = new CityInfoForm();
                    //cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    //cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                if (name.Equals("种植业"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    PlantInfoForm cInfo = new PlantInfoForm();
                    //cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    //cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                if (name.Equals("养殖畜牧渔业"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    AnimalInfoForm cInfo = new AnimalInfoForm();
                    //cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    //cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                else if (name.Equals("事件信息"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    EventInfoForm cInfo = new EventInfoForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                else if (name.Equals("监测信息"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    MonitorInfoForm1 cInfo = new MonitorInfoForm1();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                else if (name.Equals("模拟信息"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    MonitorInfoForm cInfo = new MonitorInfoForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                else if (name.Equals("专家信息"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    ExpertInfoForm cInfo = new ExpertInfoForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                else if (name.Equals("企业信息"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    CompanyInfoForm cInfo = new CompanyInfoForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                else if (name.Equals("审核申请"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    AuditApplyForm cInfo = new AuditApplyForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                else if (name.Equals("专家信息"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的。
                    ExpertInfoForm cInfo = new ExpertInfoForm();
                    cInfo.MdiParent = this;//这句代码也要写上，否则会出错。
                    cInfo.Parent = splitContainer1.Panel2;
                    cInfo.Show();
                }
                
                else {}
            }
            //数据采集菜单下的菜单项响应
            if (name != null)
            {
                if (name.Equals("风险源在线监测"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的
                    if (datacollect_com == null || datacollect_com.IsDisposed)
                    {
                        datacollect_com = new DataCollect_Com();
                    }
                    datacollect_com.Show();
                }
                else if (name.Equals("流域控制断面监测"))
                {
                    splitContainer1.Panel2.Controls.Clear();//这里是清空panel2中的控件的
                    if (datacollect_com == null || datacollect_com.IsDisposed)
                    {
                        datacollect_com = new DataCollect_Com();
                    }
                    datacollect_com.Text = "流域控制断面监测";
                    datacollect_com.Show();
                }
                else{}
            }
            //事故接警菜单下菜单项响应
            if (name != null)
            {
                if (name.Equals("事故信息录入"))
                {
                    if (eventalarm_com == null || eventalarm_com.IsDisposed)
                    {
                        eventalarm_com = new EventAlarm_com();
                    }
                    eventalarm_com.dataGridViewEventList.Height = 137;
                    eventalarm_com.buttonSaveEvent.Text = "完善事故信息";
                    eventalarm_com.Text = "事故接警";
                    eventalarm_com.Show();

                }
                else if (name.Equals("添加新事故"))
                {
                    if (eventalarm_com == null || eventalarm_com.IsDisposed)
                    {
                        eventalarm_com = new EventAlarm_com();
                    }
                    eventalarm_com.dataGridViewEventList.Height = 0;
                    eventalarm_com.buttonSaveEvent.Text = "录入事故信息";
                    eventalarm_com.Text = "事故接警";
                    eventalarm_com.Show();
                }
                else if (name.Equals("查看已录入事故"))
                {
                    if (eventalarm_com == null || eventalarm_com.IsDisposed)
                    {
                        eventalarm_com = new EventAlarm_com();
                    }
                    eventalarm_com.dataGridViewEventList.Height = 137;
                    eventalarm_com.Text = "事故接警";
                    eventalarm_com.buttonSaveEvent.Text = "修改事故信息";
                    eventalarm_com.Show();
                }
                else { }
            }
            //污染预测菜单下菜单项的响应
            if(name!=null)
            {
                if (name.Equals("开始率定"))
                {
                    MXLD_KSLD ld = new MXLD_KSLD();
                    ld.Show();
                    ld.Focus();
                }
                else if (name.Equals("查看已率定模型"))
                {
                    MXLD_CKYLDMX yldmx = new MXLD_CKYLDMX();
                    yldmx.Show();
                    yldmx.Focus();
                }
                else if (name.Equals("显示可用模型"))
                {
                    CGYC_XSKYMX kymx = new CGYC_XSKYMX();
                    kymx.Show();
                }
                else if (name.Equals("历史预测") || name.Equals("历史应急预测"))
                {
                    LSYC lsyc = new LSYC();
                    lsyc.Show();
                }
                else if (name.Equals("显示历史模型"))
                {
                    YJYC_XSLSMX lsmx = new YJYC_XSLSMX();
                    lsmx.Show();
                }
                else { }
            }
            //预警判定菜单下的菜单项响应
            if (name != null)
            {
                if (name.Equals("敏感受体信息"))
                {
                    YJPDXX_MGST mgst = new YJPDXX_MGST();
                    mgst.Show();
                }
                else if (name.Equals("危险化学品信息"))
                {
                    YJPDXX_WXHXP hxp = new YJPDXX_WXHXP();
                    hxp.Show();
                }
                else if (name.Equals("重金属信息"))
                {
                    YJPDXX_ZJS zjs = new YJPDXX_ZJS();
                    zjs.Show();
                }
                else if (name.Equals("读取预测结果"))
                {
                    YJQYPD_DQYCJG dqycjg = new YJQYPD_DQYCJG();
                    dqycjg.Show();
                }
                else if (name.Equals("风险计算"))
                {
                    YJQYPD_FXJS fxjs = new YJQYPD_FXJS();
                    fxjs.Show();
                }
                else if (name.Equals("预警分级"))
                {
                    YJQYPD_YJFJ yjfj = new YJQYPD_YJFJ();
                    yjfj.Show();
                }
                else if (name.Equals("预警图与动画制作"))
                {
                    YJDHZZ dhzz = new YJDHZZ();
                    dhzz.Show();
                }
                else if (name.Equals("过程反演"))
                {
                    YJGCFY gcfy = new YJGCFY();
                    gcfy.Show();
                }
                else { }
            }
            //风险源信息管理菜单下菜单项响应
            if (name != null)
            {
                if (name.Equals("单风险源查看与分析"))
                {
                    FXYXX_Dan dan = new FXYXX_Dan();
                    dan.Show();
                }
                else if (name.Equals("多风险源查看与分析"))
                {
                    FXYXX_Duo duo = new FXYXX_Duo();
                    duo.Show();
                }
                else if (name.Equals("基础地理信息"))
                {
                    LYXX_JCDL jcdl = new LYXX_JCDL();
                    jcdl.Show();
                }
                
                else if (name.Equals("水文地质信息"))
                {
                    LYXX_SWDZ swdz = new LYXX_SWDZ();
                    swdz.Show();
                }
               
                else if (name.Equals("监测断面信息"))
                {
                    LYXX_DMJC dmjc = new LYXX_DMJC();
                    dmjc.Show();
                }
                else if (name.Equals("沿岸城市与河流功能区信息"))
                {
                    LYXX_YACSYHL cshl = new LYXX_YACSYHL();
                    cshl.Show();
                }

                else if (name.Equals("相关企业信息"))
                {
                    QYXX qyxx = new QYXX();
                    qyxx.Show();
                }
            
                else { }

            }

        }
        bool closeflag = false;

        private void StartGovernment_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (closeflag) { }
            else
            {
                try
                {
                    if (MessageBox.Show("\r\n你确认要退出该程序吗？", "标题字符串", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        try
                        {
                            this.closeflag = true;

                        }
                        catch (Exception r)
                        {
                            MessageBox.Show(r.Message.ToString());
                        }

                    }
                    else
                    {
                        try
                        {
                            e.Cancel = true;
                        }
                        catch (Exception)
                        {

                        }
                    }
                }
                catch (Exception)
                {
                    // MessageBox.Show(ee.Message.ToString());
                }
            }
        }

        private void StartGovernment_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void 数据库管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            splitContainer1.Panel1.Controls.Clear();//这里是清空panel1中的控件的。
            this.treeView1.Nodes.Clear();
            System.Windows.Forms.TreeNode node1;//定义节点
            TreeNode node2;
            TreeNode node3;
            TreeNode node4;
            TreeNode node5;
            TreeNode node6;
            node1 = treeView1.Nodes.Add("事件信息");
            node1.Text = "事件信息";
            node2 = treeView1.Nodes.Add("监测信息");
            node2.Text = "监测信息";
            node3 = treeView1.Nodes.Add("模拟信息");
            node3.Text = "模拟信息";
            node4 = treeView1.Nodes.Add("专家信息");
            node4.Text = "专家信息";
            node5 = treeView1.Nodes.Add("企业信息1");
            node5.Name = "企业信息1";
            node5.Text = "企业信息";
            node6 = treeView1.Nodes.Add("审核申请");
            node6.Text = "审核申请";
            treeView1.Parent = splitContainer1.Panel1;
        }

        private void 应急预案ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            treeView1.Nodes.Clear();
            TreeNode node1;//定义节点
            TreeNode node2;
            TreeNode node3;
            TreeNode node4;
            TreeNode node5;
            TreeNode node6;
            TreeNode node7;
            TreeNode node8;
            TreeNode node9;
            TreeNode node20;
            TreeNode node21;
            TreeNode node22;
            TreeNode node23;
            TreeNode node24;
            TreeNode node25;
            TreeNode node26;
            TreeNode node27;
            TreeNode node30;
            TreeNode node31;
            TreeNode node32;
            TreeNode node33;
            TreeNode node34;
            TreeNode node35;

            node20 = treeView1.Nodes.Add("应急信息查看");
            node21 = node20.Nodes.Add("应急资源信息查看");
            node21.Text = "应急资源信息查看";
            node22 = node20.Nodes.Add("重金属信息查看");
            node22.Text = "重金属信息查看";
            node23 = node20.Nodes.Add("应急专家信息查看");
            node23.Text = "应急专家信息查看";
            node24 = node20.Nodes.Add("危险化学品信息查看");
            node24.Text = "危险化学品信息查看";
            node25 = node20.Nodes.Add("法律法规信息查看");
            node25.Text = "法律法规信息查看";
            node26 = node20.Nodes.Add("敏感受体信息查看");
            node26.Text = "敏感受体信息查看";
            node27 = node20.Nodes.Add("社会经济信息查看");
            node27.Text = "社会经济信息查看";
            node31 = node27.Nodes.Add("各行政区基本社会经济信息");
            node31.Text = "各行政区基本社会经济信息";
            node32 = node27.Nodes.Add("种植业");
            node32.Text = "种植业";
            node33 = node27.Nodes.Add("养殖畜牧渔业");
            node33.Text = "养殖畜牧渔业";


            node1 = treeView1.Nodes.Add("应急预案与对策");
            node1.Text = "应急预案与对策";
            node9 = treeView1.Nodes.Add("案例匹配");
            node2 = node9.Nodes.Add("权值查询");
            node2.Text = "权值查询";
            node3 = node9.Nodes.Add("案例管理");
            node3.Text = "案例管理";
            node4 = node9.Nodes.Add("案例推理");
            node4.Text = "案例推理";
            node5 = node9.Nodes.Add("预案评价");
            node5.Text = "预案评价";

            treeView1.Parent = splitContainer1.Panel1;
        }

        private void 数据采集ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //splitContainer1.Panel1.Controls.Clear();//这里是清空panel1中的控件的。
            treeView1.Nodes.Clear();
            TreeNode node1;//定义节点
            TreeNode node2;
            node1 = treeView1.Nodes.Add("风险源在线监测");
            node1.Text = "风险源在线监测";
            node2 = treeView1.Nodes.Add("流域控制断面监测");
            node2.Text = "流域控制断面监测";
            treeView1.Parent = splitContainer1.Panel1;
        }

        private void 事故接警ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            treeView1.Nodes.Clear();
            TreeNode node1;//定义节点
            TreeNode node2;
            TreeNode node3;
            node1 = treeView1.Nodes.Add("事故信息录入");
            node1.Text = "事故信息录入";
            node2 = treeView1.Nodes.Add("添加新事故");
            node2.Text = "添加新事故";
            node3 = treeView1.Nodes.Add("查看已录入事故");
            node3.Text = "查看已录入事故";
            treeView1.Parent = splitContainer1.Panel1;
        }
    }
}
